﻿<!--
<?php
    $dom = new DomDocument;
    $dom->load("aaaa.xml");
    
    foreach($dom->documentElement->childNodes as $record){
        if(($record->nodeType == 1) && ($record->nodeName == "metadata")){
            foreach($record->childNodes as $thebook){
                if(($thebook->nodeType ==1)&&($thebook->nodeName == "riss.type")){
                    $theBookTitle = $thebook->textContent;
                }
                if(($thebook->nodeType ==1)&&($thebook->nodeName == "riss.author")){
                    $theBookTitleb = $thebook->textContent;
                }
                if(($thebook->nodeType ==1)&&($thebook->nodeName == "riss.publisher")){
                    $theBookAuthor = $thebook->textContent;
                }
                
            }
            echo  "책이름a : " .$theBookTitle ."<br>"." 책이름b : " .$theBookTitleb ."<br>"."책 작가:". $theBookAuthor."<br><br>";
            unset($theBookTitle);            
            unset($theBookTitleb);
            unset($theBookAuthor);
        }
    }
    
?>
-->
<?php
$doc = new DOMDocument();
$doc->load("http://www.riss4u.net/openApi?key=70aaa00tte60abr00aaa00ro00ga052b&version=1.0&type=U&isbn=9788983712073");
$data= $doc->getElementsByTagName('riss.holdings');
$result="";

foreach($data as $elementObj){
    $hangul =  iconv("UTF-8", "EUC-KR", $elementObj->textContent);
 $result .= $hangul;
}


echo $result;
?>